System and method for supplying power at startup

ABSTRACT

A system including a switch and a control circuit. The switch is configured to receive a first voltage. The control circuit is configured to, during a rising portion of a half cycle of the first voltage, (i) turn on the switch in response to the first voltage reaching a first value, and (ii) turn off the switch in response to the first voltage reaching a second value, where the second value is greater than the first value. The control circuit is further configured to, during a falling portion of the half cycle of the first voltage, (i) turn on the switch in response to the first voltage reaching the second value, and (ii) turn off the switch in response to the first voltage reaching the first value.

CROSS-REFERENCE TO RELATED APPLICATIONS

This present disclosure is a continuation of U.S. patent applicationSer. No. 13/449,407 (now U.S. Pat. No. 8,742,735), filed on Apr. 18,2012, which claims the benefit of U.S. Provisional Application No.61/486,488, filed on May 16, 2011.

This application is related to U.S. application Ser. No. 13/467,648,filed on May 9, 2012 which claims the benefit of U.S. ProvisionalApplication No. 61/494,619, filed on Jun. 8, 2011.

The entire disclosures of the applications referenced above areincorporated herein by reference.

FIELD

The present disclosure relates to a high-voltage startup circuit forsystems that require DC power to operate when power is initially turnedon.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent the work is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against the presentdisclosure.

Referring now to FIG. 1, a power supply 100 converts an alternatingcurrent (AC) line voltage 101 to one or more direct current (DC)voltages that are suitable for a load 102. The AC line voltage 101 maybe 110V, 60 Hz or 220V, 50 Hz. The DC voltages may include a fraction of1V, 1.5V, ±5V, ±12V, 24V, or any other suitable value to drive the load102. The power supply 100 includes a step-down transformer 104 and arectifier 106. The step-down transformer 104 converts the AC linevoltage 101 to an AC voltage having a smaller value than the AC linevoltage 101 (e.g., 24V AC, 12V AC, and so on) depending on the value ofthe DC voltage to be generated. The rectifier 106 converts the ACvoltage output by the step-down transformer 104 to the DC voltage andoutputs the DC voltage to the load 102.

Referring now to FIG. 2, a power supply 150 converts the AC line voltage101 to one or more DC voltages that are suitable for the load 102. Thepower supply 150 includes a rectifier 152 and a DC-to-DC converter 154.The rectifier 152 converts the AC line voltage 101 to a DC voltage. TheDC-to-DC converter 154 converts the DC voltage output by the rectifier152 to the one or more DC voltages that are suitable for operating theload 102.

The DC-to-DC converter 154 typically includes a switching controller(e.g., a pulse width modulation (PWM) controller). The switchingcontroller requires a DC voltage for operation. The DC voltage requiredto operate the switching controller at startup (i.e., when power isturned on) is typically generated using a resistor. The resistor dropsthe AC line voltage 101 to a low value, which is used to power theswitching controller at startup. Subsequently, when the DC voltages tooperate the load 102 are generated, the switching controller is operatedusing one of the DC voltages.

An efficiency of a power supply is given by a ratio of an output voltageof the power supply to an input voltage of the power supply. Theefficiency of the power supply 150 is very low. For example, if thevalue of the DC voltage supplied by the power supply 150 to the load 102is 5V, and the value of the AC line voltage 101, is 120V (i.e.,approximately 170V RMS), then the efficiency of the power supply 150 is5/170=approximately 3%. If the DC voltage supplied to the load 102 is12V, and the AC line voltage 101 is 220V (i.e., approximately 311V RMS),then the efficiency of the power supply 150 is 12/311=approximately 4%.

Additionally, the resistor used to power the switching controller atstartup dissipates power. Further, in some applications, the powersupply 150 continues to operate and therefore dissipates power althoughthe load 102 may be switched from a normal operating mode to apower-save mode.

SUMMARY

A system comprises a power transistor configured to receive analternating current (AC) line voltage and a control circuit. During arising portion of a half cycle of the AC line voltage, the controlcircuit is configured to turn on the power transistor when the AC linevoltage reaches a first value and turn off the power transistor when theAC line voltage reaches a second value. The second value is greater thanthe first value. During a falling portion of the half cycle, the controlcircuit is configured to turn on the power transistor when the AC linevoltage reaches the second value and turn off the power transistor whenthe AC line voltage reaches the first value.

In other features, the system further comprises a capacitance, where thepower transistor charges the capacitance when the power transistor isturned on, and where the capacitance outputs a voltage having a valueless than the first value.

In other features, the control circuit is configured to turn off thepower transistor when the voltage output by the capacitance is greaterthan or equal to the first value.

In other features, the system further comprises a power supplyconfigured to generate a direct current (DC) voltage based on the ACline voltage and a controller configured to control the power supply.The voltage output by the capacitance powers the controller.

In other features, the control circuit is configured to disable thepower transistor.

In still other features, a system comprises a power transistorconfigured to receive an alternating current (AC) line voltage andcharge a capacitance to an output voltage based on when the powertransistor is turned on during a half cycle of the AC line voltage. Thesystem further comprises a control circuit configured to turn on thepower transistor to charge the capacitance when the AC line voltage isbetween a first value and a second value during a half cycle of the ACline voltage, where the first value is greater than or equal to theoutput voltage, and where the second value is greater than the firstvalue by a predetermined amount. The control circuit is furtherconfigured to turn off the power transistor when the AC line voltage isnot between the first value and the second value during the half cycleof the AC line voltage or when the capacitance is charged to the outputvoltage.

In other features, the system further comprises a controller configuredto control a power supply, where the power supply generates a directcurrent (DC) voltage based on the AC line voltage, and where thecapacitance outputs the output voltage to the controller.

In other features, the control circuit is configured to turn off thepower transistor and components of the control circuit.

In other features, the control circuit comprises a voltage dividerconfigured to divide the AC line voltage, a comparator configured tocompare an output of the voltage divider to a reference voltage, and aswitch configured to, based on the comparison, turn on the powertransistor when the AC line voltage is between the first value and thesecond value, and to turn off the power transistor when the AC linevoltage is not between the first value and the second value.

In other features, the control circuit comprises a voltage dividerconfigured to divide the output voltage, a comparator configured tocompare an output of the voltage divider to a reference voltage, and aswitch configured to, based on the comparison, turn on the powertransistor when the AC line voltage is between the first value and thesecond value and when the capacitance is charged to less than the outputvoltage, and to turn off the power transistor when the capacitance ischarged to greater than or equal to the output voltage.

In still other features, an integrated circuit (IC) comprises a firstresistance having a first end connected to an alternating current (AC)line voltage, and a second end; and a second resistance having a firstend connected to the second end of the first resistance, and a secondend. The system further comprises a first comparator having a firstinput connected to the second end of the first resistance, a secondinput connected to a reference voltage, and a first output. The systemfurther comprises a first transistor having a gate connected to thefirst output of the first comparator, a source connected to the secondend of the second resistance, and a drain; and a second transistorhaving a source connected to the second end of the second resistance, adrain connected to the drain of the first transistor, and a gate. Thesystem further comprises a second comparator having a second outputconnected to the gate of the second transistor, a first input connectedto the reference voltage, and a second input. The system furthercomprises a third resistance having a first end connected to the secondend of the second resistance and a second end connected to the secondinput of the second comparator; and a fourth resistance having a firstend connected to the second input of the second comparator and a secondend. The system further comprises a fifth resistance having a first endconnected to the second end of the fourth resistance and a second endconnected to the drain of the first transistor. The system furthercomprises a diode having a cathode connected to the first end of thefifth resistance and an anode. The system further comprises a thirdtransistor having a source connected to the anode of the diode, a drainconnected to the first end of the first resistance, and a controlterminal connected to the drain of the second transistor. The systemfurther comprises a capacitance having a first end connected to thecathode of the diode and a second end connected to the second end of thesecond resistance.

Further areas of applicability of the present disclosure will becomeapparent from the detailed description, the claims and the drawings. Thedetailed description and specific examples are intended for purposes ofillustration only and are not intended to limit the scope of thedisclosure.

BRIEF DESCRIPTION OF DRAWINGS

The present disclosure will become more fully understood from thedetailed description and the accompanying drawings, wherein:

FIG. 1 is a functional block diagram of a power supply that rectifies astepped-down alternating current (AC) line voltage according to theprior art;

FIG. 2 is a functional block diagram of a power supply that rectifiesthe AC line voltage and generates one or more DC voltages according tothe prior art;

FIGS. 3A and 3B are functional block diagrams of a power supplyincluding a startup circuit according to the present disclosure;

FIG. 4A is a schematic of the startup circuit;

FIG. 4B is a graph depicting the AC line voltage, an output voltage ofthe startup circuit, and a drain current supplied by the startup circuitas a function of time; and

FIG. 5 is a flowchart of a method for powering a controller of a powersupply at startup (i.e., when power is turned on).

DESCRIPTION

The present disclosure relates to a startup circuit that supplies powerat startup (i.e., when power is turned on) to a system that draws powerfrom AC line voltage (e.g., 120V AC) and that requires power (e.g., 5VDC) to operate at startup. For example, the startup circuit providespower to a switching controller of a power supply at startup. Based onthe power provided by the startup circuit, the switching controller cancontrol the operation of the power supply at startup so that the powersupply can generate one or more DC voltages from the AC line voltage tooperate a load.

After the power supply generates the DC voltages, one of the DC voltagescan be used to power the switching controller. Based on the DC voltagegenerated by the power supply, the switching controller continuesoperation and controls the power supply. The startup circuit can bedisabled after the DC voltage generated by the power supply is used topower the switching controller. The principles of the presentdisclosure, while described using a power supply as an example, can beapplied to any system that draws power from the AC line voltage and thatrequires power such as 5V DC to operate at startup.

Referring now to FIGS. 3A and 3B, a power supply 200 comprising astartup circuit 202 according to the present disclosure is shown. InFIG. 3A, the startup circuit 202 is arranged between a rectifier 204 anda DC-to-DC converter 206. In FIG. 3B, the startup circuit 202 isarranged between the AC line voltage 101 and the rectifier 204. Ineither arrangement, the startup circuit 202 draws power from the AC linevoltage 101 during startup and supplies a DC voltage suitable foroperating components (e.g., a switching controller) of the DC-to-DCconverter 206. The DC-to-DC converter 206 generates one or more DCvoltages suitable for operating the load 102. After the DC voltages aregenerated, the DC-to-DC converter 206 uses one of the DC voltages tooperate components such as the switching controller of the DC-to-DCconverter 206 and disables the startup circuit 202.

Referring now to FIGS. 4A and 4B, the startup circuit 202 is shown indetail. In FIG. 4A, the startup circuit 202 charges a capacitor C_(out)during each half cycle of the AC line voltage at startup. The startupcircuit 202 charges the capacitor C_(out) to an output voltage V_(out).The capacitor C_(out) supplies the output voltage V_(out) to a componentsuch as a switching controller (not shown) of the DC-to-DC converter 206at startup. For example only, suppose that the switching controllerrequires 5V DC to operate. The startup circuit 202 charges the capacitorC_(out) to 5V DC and supplies 5V DC to the switching controller atstartup.

The startup circuit 202 charges the capacitor C_(out) when the value ofthe AC line voltage is between a first value and a second value duringeach half cycle of the AC line voltage. The first value is selectedbased on the value of the output voltage V_(out). The second value isgreater than the first value. For example, if V_(out)=5V, the firstvalue may be any value greater than 5V. For example only, suppose thatthe first value is 5.1V. The second value may be 6V, 7V, 8V, or anyvalue greater than the first value. For example only, suppose that thesecond value is 6V.

In FIG. 4B, the startup circuit 202 begins charging the capacitorC_(out) at time t1 during a half cycle of the AC line voltage when theAC line voltage increases from zero to a first value greater than 5V RMS(e.g., 5.1V RMS). The startup circuit 202 charges the capacitor C_(out)until time t2 when the AC line voltage increases to a second valuegreater than the first value (e.g., 6V RMS). The startup circuit 202stops charging the capacitor C_(out) at time t2 when the AC line voltageis greater than or equal to the second value (e.g., 6V RMS).

Subsequently, the AC line voltage increases to a peak value (e.g.,1.44*110V) and begins to decrease. The startup circuit 202 again beginscharging the capacitor C_(out) at time t3 when the AC line voltagedecreases from the peak value to the second value (e.g., 6V RMS). Thestartup circuit 202 charges the capacitor C_(out) until time t4 when theAC line voltage decreases from the second value to the first value(e.g., from 6V RMS to 5.1V RMS). The startup circuit 202 stops chargingthe capacitor C_(out) at time t4 when the AC line voltage is less thanor equal to the first value (e.g., 5.1V RMS). The AC line voltage thenreturns to zero, and the cycle is repeated according to a line frequencyof the AC line voltage (e.g., 50 Hz). The capacitor C_(out) outputs theoutput voltage V_(out)=5V to the switching controller.

Based on the output voltage V_(out) supplied by the startup circuit 202,the switching controller of the DC-to-DC converter 206 operates duringstartup, and the DC-to-DC converter 206 generates one or more DCvoltages to operate the load 102. Subsequently, one of the DC voltagesgenerated by the DC-to-DC converter 206 (e.g., 5V) is used to power theswitching controller, and the startup circuit 202 can be disabled.

In the above example, the capacitor C_(out) is charged when the inputvoltage to the startup circuit 202 is between 5V RMS and 6V RMS. Sincethe maximum input voltage to the startup circuit 202 is 6V RMS, and theoutput voltage of the startup circuit 202 is 5V, the worst-caseefficiency of the startup circuit 202 is 5/6=approximately 83%. Thestartup circuit 202 is now described in detail.

In FIG. 4A, the startup circuit 202 can be manufactured as an integratedcircuit (IC) having four pins: V_(AC), V_(out), disable (DIS), andground (GND). The V_(AC) pin is connected to the AC line voltage 101.The V_(out) pin is connected to the output capacitor C_(out) andsupplies the output voltage V_(out) generated by the startup circuit 202to the DC-to-DC converter 206 at startup. The GND pin is connected toground. The DIS pin can be used to input a disable signal to turn offthe startup circuit 202 after the startup (i.e., after the DC-to-DCconverter 206 generates the one or more DC voltages) to save power. Forexample, the DC-to-DC converter 206 may send a control signal to the DISpin after the DC-to-DC converter 206 generates the one or more DCvoltages. The control signal turns off the startup circuit 202.Alternatively, the DIS pin can be connected to ground when unused.

The startup circuit 202 includes a super-high voltage, depletion-modepower transistor M1 that is controlled by comparators CI and C2;transistors M2, M3, and M4; and resistors R1 through RS. The comparatorsCI and C2; transistors M2, M3, and M4; and resistors R1 through RS maybe called a control circuit that controls the power transistor MI. Thetransistors M2, M3, and M4 may be CMOSFETs. The resistors R1 and R2 arehigh-voltage resistors.

A gate voltage of the power transistor M1 is determined by the resistorRS and the transistors M2, M3, and M4. The transistors M2, M3, and M4are controlled by the AC line voltage V_(AC), the output voltageV_(out), and the disable input (DIS), respectively. The resistor R5 isused to charge the gate voltage of the power transistor M1 to V_(out). Adiode D is a reverse blocking diode that prevents the output voltageV_(out) from discharging through a body diode of the power transistorMI.

When power is turned on (i.e., at startup), V_(out) is initially low;the transistors M2, M3, and M4 are turned off; and the gate voltage ofthe power transistor M1 is equal to V_(out). Since the power transistorM1 is a depletion mode MOSFET, the threshold voltage is negative, andthe channel is already formed. Consequently, the power transistor M1 isturned on when power is initially turned on. The capacitor C_(out) ischarged by the AC line voltage close to the threshold voltage of thepower transistor MI. A bandgap reference (BGR) generator (not shown)supplies a reference voltage V_(ref) to the comparators CI and C2.

The comparator CI receives a signal V_(ac) _(_) _(sense) that providesan indication of the AC line voltage V_(AC). The signal V_(ac) _(_)_(sense) is generated using a resistor divider comprising the resistors131 and R2. Specifically, V_(ac) _(_) _(sense)=V_(AC)*R2/(R1+R2). WhenV_(AC) is greater than V_(ac) _(_) _(sense), the transistor M2 turns onand pulls the gate voltage of the power transistor M1 to ground to turnoff the power transistor MI. In the above example, the comparator CIturns off the power transistor M1 when V_(AC) is greater than or equalto 6V RMS. The value of V_(AC) at which to turn off the power transistorM1 (e.g., 6V RMS) can be set to any value (e.g., 7V RMS, 8V RMS, 9V RMS,and so on) by selecting values of the resistors R1 and R2.

The comparator C2 receives a signal V_(out) _(_) _(sense) that providesan indication of the output voltage V_(out). The signal V_(out) _(_)_(sense) is generated using a resistor divider comprising the resistorsR3 and R4. Specifically, V_(out) _(_) _(sense)=V_(out)*R4/(R3+R4). Whenthe output voltage V_(out) is greater than V_(out) _(_) _(sense), thetransistor M3 turns on and pulls the gate voltage of the powertransistor M1 to ground to turn off the power transistor MI. In theabove example, the comparator C2 turns off the power transistor M1 andstops charging the capacitor C_(out) when the output voltage V_(out)reaches SV. The output voltage V_(out) is therefore limited to 5V andcannot exceed 5V.

Accordingly, in this example, the comparator CI turns on the powertransistor M1 and allows charging of the capacitor C_(out) when V_(AC)is less than 6V RMS and V_(out) is less than 5V, and turns off the powertransistor M1 and stops charging the capacitor C_(out) when V_(AC) isgreater than or equal to 6V RMS. The comparator C2 allows the comparatorCI to turn on the power transistor M1 when V_(AC) is less than 6V RMSand allows charging of the capacitor C_(out) when V_(out) is less than5V, and turns off the power transistor M1 and stops charging thecapacitor C_(out) when V_(out) is equal to 5V.

The disable (DIS) input of the startup circuit 202 is an optionalcontrol that can be used by an independent application-specificcontroller to turn off the start-up circuit 202 to save power. Forexample, when the DIS pin is pulled up, the transistor M4 turns on andpulls the gate voltage of the power transistor M1 to ground to turn offthe power transistor MI. The transistor M4 turns off the powertransistor M1 regardless of the states of the transistors M2 and M3determined by the comparators CI and C2. Alternatively, the powertransistor M1 can also be turned off by applying a voltage greater thanV_(out) at the V_(out) pin. The voltage greater than V_(out) may begenerated by a power supply (e.g., the DC-to-DC converter 206).

In FIG. 4B, when power is turned on, the AC line voltage V_(AC) (or theoutput voltage V_(rect) of the rectifier 204) increases from zero. Attime t1, V_(AC) increases from zero to 5.1V RMS, for example. The powertransistor M1 is turned on at time t1. At time t2, V_(AC) increases from5.1V RMS to 6V RMS, for example. The power transistor M1 is turned onuntil time t2 and turned off at time t2. Subsequently, V_(AC) increasesto a peak value of V_(AC) and starts to decrease. At time t3, V_(AC)decreases from the peak value to 6V, for example. The power transistorM1 is turned on at time t3. At time t4, V_(AC) decreases from 6V to5.1V, for example. The power transistor M1 is turned on until time t4and turned off at time t4. Subsequently, V_(AC) decreases to OV, and thecycle repeats at the line frequency of the AC line voltage V_(AC).

A drain current I_(drain) flows through the power transistor M1 andcharges the capacitor C_(out) to the output voltage V_(out) from time t1to t2 and from time t3 to t4. The output voltage V_(out) increases fromtime t1 to t2 and from time t3 to t4. The power transistor M1 is turnedoff and does not charge the capacitor C_(out) at other times during thehalf cycle. The capacitor C_(out) discharges from time t2 to t3 and fromtime t4 to t1. The output voltage V_(out) therefore decreases from timet2 to t3 and from time t4 to t1.

Referring now to FIG. 5, a method 250 for powering a controller of apower supply at startup (i.e., when power is turned on) is shown. At252, control determines if power to a power supply (e.g., AC linevoltage) is turned on and waits until power is turned on. At 254, whenpower is turned on, control turns on a power transistor and charges acapacitor when the AC line voltage is between a first value and a secondvalue during rising and falling portions of each half cycle of the ACline voltage. Control turns off the power transistor at other timesduring each half cycle. Control also turns the power transistor on andoff based on whether the output voltage of the capacitor is less than orequal to a desired voltage (e.g., 5V DC). At 256, control uses thevoltage output by the capacitor to power the controller of the powersupply. Accordingly, the power supply can generate one or more DCvoltages from the AC line voltage. At 258, control determines if theoutput of the power supply is stable. Control returns to 254 if theoutput of the power supply is not yet stable. At 260, if the output ofthe power supply is stable, control uses the output of the power supplyto power the controller and turns of the startup circuit comprising thepower transistor and the capacitor.

The foregoing description is merely illustrative in nature and is in noway intended to limit the disclosure, its application, or uses. Thebroad teachings of the disclosure can be implemented in a variety offorms. Therefore, while this disclosure includes particular examples,the true scope of the disclosure should not be so limited since othermodifications will become apparent upon a study of the drawings, thespecification, and the following claims. For purposes of clarity, thesame reference numbers will be used in the drawings to identify similarelements. As used herein, the phrase at least one of A, B, and C shouldbe construed to mean a logical (A or B or C), using a non-exclusivelogical OR. It should be understood that one or more steps within amethod may be executed in different order (or concurrently) withoutaltering the principles of the present disclosure.

What is claimed is:
 1. A system comprising: a switch configured toreceive a first voltage; and a control circuit configured to during arising portion of a half cycle of the first voltage, (i) turn on theswitch in response to the first voltage reaching a first value, and (ii)turn off the switch in response to the first voltage reaching a secondvalue, wherein the second value is greater than the first value; andduring a falling portion of the half cycle of the first voltage, (i)turn on the switch in response to the first voltage reaching the secondvalue, and (ii) turn off the switch in response to the first voltagereaching the first value.
 2. The system of claim 1, further comprising:a capacitance, wherein the switch charges the capacitance in response tothe switch being turned on, wherein the capacitance outputs a secondvoltage, and wherein a value of the second voltage is less than thefirst value.
 3. The system of claim 2, wherein the control circuit isconfigured to turn off the switch in response to the value of the secondvoltage output by the capacitance being greater than or equal to thefirst value of the first voltage.
 4. The system of claim 2 furthercomprising: a power supply configured to generate a third voltage basedon the first voltage; and a controller configured to control the powersupply, wherein the controller is powered, prior to the power supplygenerating the third voltage, by the second voltage output by thecapacitance.
 5. The system of claim 4, wherein the control circuit isconfigured to disable the switch in response to the power supply (i)generating the third voltage, and (ii) supplying the third voltage tothe controller.
 6. A system comprising: a first switch configured toreceive a first voltage and charge a capacitance to a second voltage inresponse to the first switch being turned on during a half cycle of thefirst voltage; a control circuit configured to turn on the first switchto charge the capacitance in response to the first voltage being greaterthan a first value and less than a second value during the half cycle ofthe first voltage, wherein the first value is greater than or equal tothe second voltage, and wherein the second value is greater than thefirst value by a predetermined amount, and turn off the first switch inresponse to (i) the first voltage being not greater than the first valueand not less than the second value during the half cycle of the firstvoltage, or (ii) the capacitance being charged to the second voltage; asecond switch to control the first switch based on the first voltage;and a third switch to control the first switch based on the secondvoltage, wherein outputs of the second switch and the third switch aredirectly connected to a control input of the first switch.
 7. The systemof claim 6, further comprising: a controller configured to control apower supply, wherein the power supply generates a third voltage basedon the first voltage, and wherein the controller is powered, prior tothe power supply generating the third voltage, by the second voltageoutput by the capacitance.
 8. The system of claim 7, wherein the controlcircuit is configured to disable the first switch in response to thepower supply (i) generating the third voltage, and (ii) supplying thethird voltage to the controller.
 9. The system of claim 6, wherein thecontrol circuit comprises: a voltage divider configured to divide thefirst voltage; and a comparator configured to compare an output of thevoltage divider to a reference voltage; wherein the second switch isconfigured to, based on the comparison, (i) turn on the first switch inresponse to the first voltage being greater than the first value andless than the second value, and (ii) turn off the first switch inresponse to the first voltage being not greater than the first value andnot less than the second value during the half cycle of the firstvoltage.
 10. The system of claim 6, wherein the control circuitcomprises: a voltage divider configured to divide the second voltageoutput by the capacitance; and a comparator configured to compare anoutput of the voltage divider to a reference voltage; wherein the thirdswitch is configured to, based on the comparison, turn on the firstswitch in response to (i) the first voltage being greater than the firstvalue and less than the second value, and (ii) the capacitance beingcharged to less than the second voltage; and turn off the first switchin response to the capacitance being charged to greater than or equal tothe second voltage.
 11. An integrated circuit, comprising: a firstresistance including a first terminal and a second terminal, wherein thefirst terminal is connected to a first voltage; a second resistanceincluding a first terminal and a second terminal, wherein the firstterminal of the second resistance is connected to the second terminal ofthe first resistance; a first comparator including a first input, asecond input, and a first output, wherein the first input is connectedto the second terminal of the first resistance, and wherein the secondinput is connected to a reference voltage; a first switch including afirst terminal, a second terminal, and a control terminal, wherein thefirst terminal is connected to the second terminal of the secondresistance, and wherein the control terminal is connected to the firstoutput of the first comparator; a second switch including a firstterminal, a second terminal, and a control terminal, wherein the firstterminal of the second switch is connected to the second terminal of thesecond resistance, and wherein the second terminal of the second switchis connected to the second terminal of the first switch; a secondcomparator including a first input, a second input, and a second output,wherein the first input of the second comparator is connected to thereference voltage, and wherein the second output is connected to thecontrol terminal of the second switch; a third resistance including afirst terminal and a second terminal, wherein the first terminal of thethird resistance is connected to the second terminal of the secondresistance, and wherein the second terminal of the third resistance isconnected to the second input of the second comparator; a fourthresistance including a first terminal and a second terminal, wherein thefirst terminal of the fourth resistance is connected to the second inputof the second comparator; a fifth resistance including a first terminaland a second terminal, wherein the first terminal of the fifthresistance is connected to the second terminal of the fourth resistance,and wherein the second terminal of the fifth resistance is connected tothe second terminal of the first switch; a diode including a firstterminal and a second terminal, wherein the first terminal of the diodeis connected to the first terminal of the fifth resistance; a thirdswitch including a first terminal, a second terminal, and a controlterminal, wherein the first terminal of the third switch is connected tothe second terminal of the diode, wherein the second terminal of thethird switch is connected to the first terminal of the first resistance,and wherein the control terminal of the third switch is connected to thesecond terminal of the second switch; and a capacitance including afirst terminal and a second terminal, wherein the first terminal of thecapacitance is connected to the first terminal of the diode, and whereinthe second terminal of the capacitance is connected to the secondterminal of the second resistance.
 12. The integrated circuit of claim11, further comprising: a fourth switch including a first terminal, asecond terminal, and a control terminal, wherein the first terminal ofthe fourth switch is connected to the second terminal of the secondresistance, and wherein the second terminal of the fourth switch isconnected to the second terminal of the first switch, wherein the fourthswitch is configured to turn off the third switch irrespective of statesof the first switch and the second switch in response to the controlterminal of the fourth switch being pulled up.
 13. A method comprising:supplying a first voltage to a switch; during a rising portion of a halfcycle of the first voltage, (i) turning on the switch in response to thefirst voltage reaching a first value, and (ii) turning off the switch inresponse to the first voltage reaching a second value, wherein thesecond value is greater than the first value; and during a fallingportion of the half cycle, (i) turning on the switch in response to thefirst voltage reaching the second value, and (ii) turning off the switchin response to the first voltage reaching the first value.
 14. Themethod of claim 13, further comprising: charging a capacitance to asecond voltage in response to the switch being turned on, wherein avalue of the second voltage is less than the first value.
 15. The methodof claim 14, further comprising turning off the switch in response tothe value of the second voltage output by the capacitance being greaterthan or equal to the first value of the first voltage.
 16. The method ofclaim 14, further comprising: generating a third voltage based on thefirst voltage using a power supply; and supplying, prior to the powersupply generating the third voltage, the second voltage output by thecapacitance to a controller configured to control the power supply. 17.The method of claim 16, further comprising disabling the switch inresponse to the power supply (i) generating the third voltage, and (ii)supplying the third voltage to a controller configured to control thepower supply.
 18. A method comprising: supplying a first voltage to afirst switch; charging a capacitance to a second voltage in response tothe first switch being turned on during a half cycle of the firstvoltage; turning on the first switch to charge the capacitance inresponse to the first voltage being greater than a first value and lessthan a second value during a half cycle of the first voltage, whereinthe first value is greater than or equal to the second voltage, andwherein the second value is greater than the first value by apredetermined amount; turning off the first switch in response to (i)the first voltage being not greater than the first value and not lessthan the second value during the half cycle of the first voltage, or(ii) in response to the capacitance being charged to the second voltage;controlling the first switch based on the first voltage using a secondswitch; and controlling the first switch based on the second voltageusing a third switch, wherein outputs of the second switch and the thirdswitch are directly connected to a control input of the first switch.19. The method of claim 18, further comprising controlling, based on thesecond voltage, a power supply configured to generate a third voltagebased on the first voltage.
 20. The method of claim 19, furthercomprising disabling the first switch in response to the power supply(i) generating the third voltage, and (ii) supplying the third voltageto a controller configured to control the power supply.
 21. The methodof claim 18, further comprising: dividing the first voltage using avoltage divider; comparing an output of the voltage divider to areference voltage; and based on the comparison, using the second switch,(i) turning on the first switch in response to the first voltage beinggreater than the first value and less than the second value, and (ii)turning off the first switch in response to the first voltage being notgreater than the first value and not less than the second value duringthe half cycle of the first voltage.
 22. The method of claim 18, furthercomprising: dividing the second voltage output by the capacitance usinga voltage divider; comparing an output of the voltage divider to areference voltage; and based on the comparison, using the third switch,(i) turning on the first switch in response to the first voltage beinggreater than the first value and less than the second value, and inresponse to the capacitance being charged to less than the secondvoltage; and (ii) turning off the first switch in response to thecapacitance being charged to greater than or equal to the secondvoltage.